﻿import cn.eminia.AS2.Bo4;
import mx.utils.Delegate;
class cn.eminia.AS2.Bgp_bar {
	// [用法]
	//var myBgp=new Bgp();
	//...按钮程式...
	//myBgp.push(a);
	//}
 	//myBgp.set(0) ;
	//
	//Bgp = Btn group
	var _g:Array = [];
	var _id:Number; 
	function Bgp_bar () {
	}
	function push(btn) {
		this._g.push(btn);
		btn.gid = this._g.length-1;
		btn._onRelease=btn.onRelease;
		btn.gp=this;
		btn.onRelease=function(){ 
			trace('gid '+this.gid+'\t'+this.gp._id)
			if(this.gid==this.gp._id){
				return;
			}  
			this._onRelease(); 
			this.gp._id = this.gid;
		};
	}
	function set(id) {
		//doSth(id);
		this._id = id;
	}
	function getID() { 
		return this._id ;
	}
	function get id() { 
		return this._id ;
	} 
}